package ynu.sxp.demoapp.cart.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import ynu.sxp.demoapp.cart.entity.CartEntity;
import ynu.sxp.demoapp.user.entity.UserEntity;

import java.util.Optional;
import java.util.UUID;

@Repository
public interface CartRepository extends JpaRepository<CartEntity, UUID> {
    CartEntity findByUser(UserEntity user);
    Optional<CartEntity> findById(UUID cartId);
}